package com.honey.service.field;

import com.honey.compilation.java.Field;
import com.honey.core.generator.PresentationLayerCompilation;
import com.honey.core.types.FullyQualifiedJavaType;
import com.honey.generator.java.AbstractClassName;
import com.honey.service.SampleServicePlugin;

public class ServiceField extends AbstractClassName {
	
	private PresentationLayerCompilation presentationLayer;
	
	public ServiceField(
				SampleServicePlugin sampleServicePlugin,
				PresentationLayerCompilation presentationLayer
				
			){
		super(sampleServicePlugin);
		this.presentationLayer =  presentationLayer;
	}
	
	public Field createField( ){
		FullyQualifiedJavaType type = presentationLayer.layerType();
		String name = super.getVariableName(type.getShortName());
		return  new Field(name, type);
	}
}
